<extend name="Layout/layout"/>
<block name="style">
<style>
.fbutton{
    color: rgba(255, 255, 255, .9);
    background: #1E9FFF;
    display: inline-block;
    vertical-align: middle;
    font-size: 14px;
    transition: all .2s;
    -webkit-transition: all .2s;
    position: relative;
    line-height: 40px;
    min-width: 65px;
    padding: 0 15px;
    text-align: center;
    cursor: pointer;
}
.layui-breadcrumb .documentAction{ color:#0f9fff!important; }
</style>
</block>
<block name="body">

    <div id="content-main" style="overflow: hidden;">

        <div class="fl" id="document-left">
            <h2 class="doc-left-title"><a href="{:U('Home/document/document')}">档案管理</a></h2>
            <ul class="list-group">
                <foreach name="leftlist" item="vo" key="k" >
                    <li class="list-group-item">
                        <a href="{:U('Home/document/document',array('id'=>$vo[id]))}"><i class="fa fa-building"></i> {$vo.title}</a>
                    </li>
                </foreach>
            </ul>
        </div>
        <div class="" id="document-right">

            <ol class="breadcrumb text-right" id="document-right-title">
                <div class="input-group fl" style="width: 300px">
                    <input type="text" class="documentSearchInput form-control" placeholder="文档检索/名称" value="{$SearchValue}">
                    <span class="input-group-btn">
                    <a href="javascript:void(0);" class="documentSearch btn layui-btn-normal" type="button"><span style="color:#fff">搜索</span></a>
                  </span>
                </div><!-- /input-group -->

                <li><a href="{:U('Home/index/index')}"><i class="fa fa-home"></i></a></li>
                <li><a href="{:U('Home/document/index')}">图纸档案管理</a></li>
                <li class="active">{$projectinfo['title']}</li>
            </ol>

            <div class="layui-tab" style="margin: 15px">
                <ul class="layui-tab-title">
                    <li class="layui-this">{$projectinfo['title']}</li>
                    <li>上传文档</li>
                </ul>
                <div class="layui-tab-content">

                    <div class="layui-tab-item layui-show">
                        <div class="site-text" >
                            <p>
                                <span class="layui-breadcrumb" lay-separator="|" style="visibility: visible;">
                                    <a href="">项目阶段：</a>
                                    <foreach name="column.stage" item="vo" key="k" >
                                        <a href="{:U('Home/document/document',array('stage'=>$vo['id']))}" <if condition="$vo['id'] eq $stage">class="documentAction"</if>>
                                        {$vo.title}
                                        </a>
                                    </foreach>
                                </span>
                            </p>
                            <p>
                                <span class="layui-breadcrumb" lay-separator="|"  style="visibility: visible;">
                                    <a href="">文档：</a>
                                    <foreach name="column.document" item="vo" key="k" >
                                        <a href="{:U('Home/document/document',array('document'=>$vo['id']))}" <if condition="$vo['id'] eq $document">class="documentAction"</if>>
                                        {$vo.title}
                                        </a>
                                    </foreach>
                                </span>
                            </p>
                            <p>
                                <span  class="layui-breadcrumb" lay-separator="|" style="visibility: visible;">
                                    <a href="">图纸：</a>
                                    <foreach name="column.cad" item="vo" key="k" >
                                        <a href="{:U('Home/document/document',array('cad'=>$vo['id']))}" <if condition="$vo['id'] eq $cad">class="documentAction"</if>>
                                        {$vo.title}
                                        </a>
                                    </foreach>
                                </span>
                            </p>
                            <p>
                                <span class="layui-breadcrumb" lay-separator="|"  style="visibility: visible;">
                                    <a href="">模型：</a>
                                    <foreach name="column.mode" item="vo" key="k" >
                                        <a href="{:U('Home/document/document',array('mode'=>$vo['id']))}" <if condition="$vo['id'] eq $mode">class="documentAction"</if>>
                                        {$vo.title}
                                        </a>
                                    </foreach>
                                </span>
                            </p>
                        </div>

                        <table class="layui-table" lay-even >
                            <colgroup>
                                <col width="60">
                                <col width="200">
                                <col>
                                <col>
                                <col>
                                <col>
                                <col width="230">
                            </colgroup>
                            <thead>
                            <tr>
                                <th>序号</th>
                                <th>文档名称</th>
                                <th>所属栏目</th>
                                <th>大小</th>
                                <th>上传时间</th>
                                <th>上传人</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <foreach name="listinfo" item="vo" key="k" >
                                <tr id="{$vo.id}">
                                    <td>{$k+1}</td>
                                    <td>{$vo.title}</td>
                                    <td>{$vo.type}</td>
                                    <td>{$vo.size}</td>
                                    <td>{$vo.ttime}</td>
                                    <td>{$vo.uid}</td>
                                    <td>
                                        <if condition="$usertype eq 1">
                                            <a href="{:U('Home/document/download',array('fileid'=>$vo['fileid']))}" target="_blank" class="documentdownload layui-btn layui-btn-sm layui-btn-normal" > <i class = "layui-icon" > &#xe601; </i></a >
                                            <!--a href="{$vo.edit}" class="documentedit layui-btn layui-btn-sm layui-btn-green" > <i class = "layui-icon" > &#xe642; </i></a -->
                                            <a href="javascript:void(0);" class="documentdelete layui-btn layui-btn-sm layui-btn-danger" > <i class = "layui-icon" > &#xe640; </i></a >
                                        </if>
                                            <a href="javascript:void(0);" date-href="{:U('Home/document/onlineshow',array('documentid'=>$vo['id']))}" class="documentshow layui-btn layui-btn-sm layui-btn-purple" > <i class = "layui-icon" > &#xe621; </i></a >
                                    </td>
                                </tr>
                            </foreach>
                            </tbody>
                        </table>
                        <!--div class="layui-table-page mb10">
                            <div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-1">
                                <a href="javascript:;" class="layui-laypage-prev layui-disabled" data-page="0">
                                    <i class="layui-icon"></i></a>
                                <span class="layui-laypage-curr">
                                    <em class="layui-laypage-em"></em>
                                    <em>1</em></span>
                                <a href="javascript:;" data-page="2">2</a>
                                <a href="javascript:;" class="layui-laypage-next" data-page="2">
                                    <i class="layui-icon"></i></a>
                                <span class="layui-laypage-skip">到第
                                    <input type="text" min="1" value="1" class="layui-input">页
                                    <button type="button" class="layui-laypage-btn">确定</button></span>
                                <span class="layui-laypage-count">共 7 条</span>
                                <span class="layui-laypage-limits">
                                    <select lay-ignore="">
                                        <option value="3">3 条/页</option>
                                        <option value="5" selected="">5 条/页</option>
                                        <option value="10">10 条/页</option></select>
                                </span>
                            </div>
                        </div-->
                        <div class="layui-table-page mb10">
                            <div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-1">
                                {$_page}
                            </div>
                        </div>

                    </div>

                    <div class="layui-tab-item">
                        <form class="layui-form" action="" style="padding-top: 15px;">
                            <div class="layui-form-item">
                                <label class="layui-form-label w120">文档名称</label>
                                <div class="layui-input-block ml120">
                                    <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请在此处填写文档名称" class="documentname layui-input"></div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label w120">
                                    <span class="text-danger">*</span>项目阶段
                                </label>
                                <div class="layui-input-block ml120">
                                    <select name="interest" class="documentstage" lay-filter="documentstage">
                                        <foreach name="CateColumn.stage" item="vo" key="k" >
                                            <option value="{$vo.id}">{$vo.title}</option>
                                        </foreach>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label w120">
                                    <span class="text-danger">*</span>类型
                                </label>
                                <div class="layui-input-block ml120">
                                    <select name="interest" class="documenttype" lay-filter="documenttype">
                                        <option value="document">文档</option>
                                        <option value="cad">图纸</option>
                                        <option value="mode">模型</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label w120">
                                    <span class="text-danger">*</span>类型
                                </label>
                                <div class="layui-input-block ml120">
                                    <select name="interest" class="documentcate" lay-filter="documentcate">
                                        <foreach name="CateColumn.document" item="vo" key="k" >
                                            <option value="{$vo.id}">{$vo.title}</option>
                                        </foreach>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label w120">
                                    <span class="text-danger">*</span>上传文件
                                </label>
                                <div class="layui-input-block ml120">
                                    <button type="button" class="documentfile layui-btn layui-btn-green" id="test1" fileid="">
                                        <i class="layui-icon">&#xe681;</i>选择文件
                                    </button>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block ml120">
                                    <a href="javascript:void(0);" class="documentsubmit layui-btn layui-btn-normal" lay-submit="" lay-filter="demo1">添加</a>
                                    <a href="javascript:void(0);" class="documentback layui-btn layui-btn-primary">返回</a>
                                </div>
                            </div>
                        </form>
                    </div>

                </div>
            </div>

        </div>

    </div>

</block>
<block name="script">
    <script>
        var searchurl = "{:U('Home/Document/Document')}";
        var documentsave = "{:U('Home/Document/documentsave')}";
        var documentdelete = "{:U('Home/Document/documentdelete')}";
        var CateColumnSelect = "{:U('Home/Document/CateColumnSelect')}";
    </script>
</block>
